*This Stata do-file replicates Figure 2 in Patrick J. Egan and Megan Mullin, "US Partisan Polarization on Climate Change: Can Stalemate Give Way to Opportunity?" forthcoming in PS: Political Science and Politics.

*this do-file last updated June 16, 2023.

*see "Figure 2 replication.txt" in this replication archive for details.


version 16
clear all
set more off
set scheme cleanplots
graph set window fontface "Helvetica"

cd "C:\Users\pje202\Dropbox\p.PS CC polarization\Climate polarization - PS\Replication archive\Figure 2 replication"

*bottom panel:

use pew.dta, clear

twoway (line pr y if issue=="crime", lw(vthin) lc(emidblue) lp(solid)) (line pr y if issue=="deficit", lw(vthin) lp(solid) lc(emidblue)) (line pr y if issue=="economy", lw(vthin) lp(solid) lc(emidblue)) (line pr y if issue=="education", lp(solid) lw(vthin) lc(emidblue)) (line pr y if issue=="health care", lw(vthin) lp(solid) lc(emidblue)) (line pr y if issue=="immigration", lw(vthin) lp(solid) lc(emidblue)) (line pr y if issue=="jobs", lw(vthin) lp(solid) lc(emidblue)) (line pr y if issue=="military", lp(solid) lw(vthin) lc(emidblue)) (line pr y if issue=="poor", lw(vthin) lp(solid) lc(emidblue)) (line pr y if issue=="social security", lw(vthin) lp(solid) lc(emidblue)) (line pr y if issue=="terrorism", lw(vthin) lp(solid) lc(emidblue)) (line pr y if issue=="trade", lw(vthin) lp(solid) lc(emidblue)) (line pr y if issue=="climate change", lp(solid) lw(thick) lc(blue)) if party=="dem", xlabel(2007(5)2022) scheme(cleanplots) legend(off) ylabel(0(25)100) xtitle("") aspect(1) ytitle(`"% naming concern as a "top priority""') text(22 2024 "MILITARY", c(emidblue) size(vsmall) ) text(29 2024 "TRADE", c(emidblue) s(vsmall)) text(31 2024 "DEFICIT", c(emidblue) s(vsmall)) text(35 2024 "IMMIGRATION", c(emidblue) s(vsmall)) text(45 2024 "CRIME", c(emidblue) s(vsmall)) text(48 2024 "TERRORISM", c(emidblue) s(vsmall)) text(50 2024 "JOBS", c(emidblue) s(vsmall)) text(56 2024 "SOCIAL SECURITY", c(emidblue) s(vsmall)) text(58 2024 "POVERTY", c(emidblue) s(vsmall)) text(62.5 2024 "ECONOMY", c(emidblue) s(vsmall)) text(65 2024 "{bf:CLIMATE CHANGE}", c(blue) s(vsmall)) text(67 2024 "EDUCATION", c(emidblue) s(vsmall)) text(69.5 2024 "HEALTH CARE", c(emidblue) s(vsmall))title("{bf:Democratic priorities}") graphregion(margin(l-20)) xsize(4) ysize(3)

graph save fig2bd, replace

twoway (line pr y if issue=="crime", lw(vthin) lc(erose) lp(solid)) (line pr y if issue=="deficit", lw(vthin) lp(solid) lc(erose)) (line pr y if issue=="economy", lw(vthin) lp(solid) lc(erose)) (line pr y if issue=="education", lp(solid) lw(vthin) lc(erose)) (line pr y if issue=="health care", lw(vthin) lp(solid) lc(erose)) (line pr y if issue=="immigration", lw(vthin) lp(solid) lc(erose)) (line pr y if issue=="jobs", lw(vthin) lp(solid) lc(erose)) (line pr y if issue=="military", lp(solid) lw(vthin) lc(erose)) (line pr y if issue=="poor", lw(vthin) lp(solid) lc(erose)) (line pr y if issue=="social security", lw(vthin) lp(solid) lc(erose)) (line pr y if issue=="terrorism", lw(vthin) lp(solid) lc(erose)) (line pr y if issue=="trade", lw(vthin) lp(solid) lc(erose)) (line pr y if issue=="climate change", lp(solid) lw(thick) lc(red)) if party=="rep", xlabel(2007(5)2022) scheme(cleanplots) legend(off) ylabel(0(25)100) xtitle("") aspect(1) ytitle(`"% naming concern as a "top priority""') text(54 2024 "MILITARY", c(erose) size(vsmall) ) text(40 2024 "TRADE", c(erose) s(vsmall)) text(63 2024 "DEFICIT", c(erose) s(vsmall)) text(67 2024 "IMMIGRATION", c(erose) s(vsmall)) text(60 2024 "CRIME", c(erose) s(vsmall)) text(65 2024 "TERRORISM", c(erose) s(vsmall)) text(56 2024 "JOBS", c(erose) s(vsmall)) text(58 2024 "SOCIAL SECURITY", c(erose) s(vsmall)) text(25 2024 "POVERTY", c(erose) s(vsmall)) text(82 2024 "ECONOMY", c(erose) s(vsmall)) text(11 2024 "{bf:CLIMATE CHANGE}", c(red) s(vsmall)) text(48 2024 "EDUCATION", c(erose) s(vsmall)) text(52 2024 "HEALTH CARE", c(erose) s(vsmall)) title("{bf:Republican priorities}") graphregion(margin(l-20)) xsize(4) ysize(3)

graph save fig2br, replace

graph combine fig2bd.gph fig2br.gph, rows(1) xsize(7) ysize(3)
graph save fig2b, replace


*top panel:

use gallup.dta, clear

twoway (connected gw_alreadybegun yr if partyrr==3, ms(o) mc(blue) lc(blue) mfc(blue)) (connected gw_alreadybegun yr if partyrr==1, mc(red) lc(red)) (connected gw_alreadybegun yr if partyrr==9, ms(o) mc(gs7) lc(gs7)), ytitle("% agreeing") title("{bf:Effects of global warming}" "{bf:have already begun}") xlabel(2002(5)2022) xtitle("") scheme(cleanplots) ylabel(0(25)100) legend(off) aspect(1) ysize(3) xsize(3) text(89 2022 "{bf:85%}", c(blue)) text(44 2022 "{bf:39%}", c(red)) text(64 2022 "{bf:60%}", c(gs7)) legend(on label(3 "American public") label(1 "Democrats") label(2 "Republicans") order(1 3 2) pos(6))

graph save begun.gph, replace


twoway (connected gw_human yr if partyrr==3, ms(o) mc(blue) lc(blue) mfc(blue)) (connected gw_human yr if partyrr==1, mc(red) lc(red)) (connected gw_human yr if partyrr==9, ms(o) mc(gs7) lc(gs7)), ytitle("% agreeing") title("{bf:Temperature increases are due to}" "{bf:pollution from human activity}") xlabel(2002(5)2022) xtitle("") scheme(cleanplots) ylabel(0(25)100) legend(off) aspect(1) ysize(3) xsize(3) text(96 2022 "{bf:91%}", c(blue)) text(39 2022 "{bf:33%}", c(red)) text(69 2022 "{bf:65%}", c(gs7)) legend(on label(3 "American public") label(1 "Democrats") label(2 "Republicans") order(1 3 2) pos(6))

graph save human.gph, replace


twoway (connected gw_your yr if partyrr==3, ms(o) mc(blue) lc(blue) mfc(blue)) (connected gw_your yr if partyrr==1, mc(red) lc(red)) (connected gw_your yr if partyrr==9, ms(o) mc(gs7) lc(gs7)), ytitle("% agreeing") title("{bf:Global warming will pose a serious threat}" "{bf:to you or your way of life}") xlabel(2002(5)2022) xtitle("") scheme(cleanplots) ylabel(0(25)100) legend(off) aspect(1) ysize(3) xsize(3) text(79 2022 "{bf:73%}", c(blue)) text(19 2022 "{bf:14%}", c(red)) text(49 2022 "{bf:45%}", c(gs7)) legend(on label(3 "American public") label(1 "Democrats") label(2 "Republicans") order(1 3 2) pos(6))

graph save yourlife.gph, replace

graph combine "begun.gph" "human.gph" "yourlife.gph", ycommon xcommon rows(1) ysize(2) xsize(4)
graph save fig2t, replace



graph combine fig2t.gph fig2b.gph, rows(2) iscale(*.8)

graph export Figure2.tif, as(tif) width(3000) replace
